/*
 * @lc app=leetcode.cn id=717 lang=typescript
 *
 * [717] 1 比特与 2 比特字符
 */

// @lc code=start
function isOneBitCharacter(bits: number[]): boolean {
    for (let i = 0; i < bits.length; i++) {
        const element = bits[i];
        if (i === bits.length - 1) return true;
        if (element === 1) {
            i++;
        }
    }
    return false;
}
// @lc code=end
